home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Technology Seed / ADC Seed CD - July 1999.toast / Carbon SDK 1.0d10c3 / Sample Code / AppearanceSample / ColorPenState.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-01  |  1.2 KB  |  68 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ColorPenState.h
  3.  
  4.     Contains:    Utility routines to save and restore the graphics state of a grafport.
  5.  
  6.     Version:    Appearance 1.0 SDK
  7.  
  8.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                Edward Voas
  13.  
  14.         Other Contact:        7 of 9, Borg Collective
  15.  
  16.         Technology:            OS Technologies Group
  17.  
  18.     Writers:
  19.  
  20.         (edv)    Ed Voas
  21.  
  22.     Change History (most recent first):
  23.  
  24.          <1>     9/11/97    edv        First checked in.
  25. */
  26.  
  27. #ifndef __COLORPENSTATE__
  28. #define __COLORPENSTATE__
  29.  
  30. #include <Quickdraw.h>
  31.  
  32. #if PRAGMA_ALIGN_SUPPORTED
  33. #pragma options align=mac68k
  34. #endif
  35.  
  36. struct ColorPenState
  37. {
  38.     RGBColor        foreColor;
  39.     RGBColor        backColor;
  40.     PenState        pen;
  41.     SInt16            textMode;
  42.     PixPatHandle    pnPixPat;
  43.     PixPatHandle    bkPixPat;
  44.     UInt32            fgColor;
  45.     UInt32            bkColor;
  46. };
  47. typedef struct ColorPenState ColorPenState;
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52.  
  53. //    NOTE: The hasColor parameter is going away! Be warned...
  54.  
  55. extern void        GetColorAndPenState( ColorPenState* state );
  56. extern void        SetColorAndPenState( ColorPenState* state );
  57. extern void        NormalizeColorAndPen();
  58.  
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62.  
  63. #if PRAGMA_ALIGN_SUPPORTED
  64. #pragma options align=reset
  65. #endif
  66.  
  67. #endif // __COLORPENSTATE__
  68.